import request from '@/utils/request'
/**
 * 维护管理模块
 */
// 维护计划
/**
 * 维护计划表分页查询
 */
export const maintainPlanList = (params, page, size) => {
  return request({
    url: `/opermgt/maintainPlan/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}
// 维护计划表根据ID删除
export const delpipePostById = (id) => {
  return request({
    url: `/opermgt/maintainPlan/${id}`,
    method: 'DELETE'
  })
}
// 查询所有角色
export const searchPersonl = () => {
  return request({
    url: '/sys/role',
    method: 'GET'
  })
}
// 查询维护类型
export const repairType = (data) => {
  return request({
    url: '/opermgt/dict/queryByType',
    method: 'POST',
    data
  })
}
//保存维修计划
export const saveplan = (data) => {
  return request({
    url: '/opermgt/maintainPlan',
    method: 'POST',
    data
  })
}
/**
 *  维修计划搜索
 */
export const repairSearch = (data) => {
  return request({
    url: '/opermgt/maintainPlan/search',
    method: 'POST',
    data: data
  })
}
// 问题管理分页查询
export const problemList = (params, page, size) => {
  return request({
    url: `/opermgt/problemInfo/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}
/**
 * 问题信息流程操作保存
 */
export const clearProblem = (data) => {
  return request({
    url: '/opermgt/problemInfo/option',
    method: 'POST',
    data: data
  })
}
/**
 * 问题信息流程操作保存
 */
export const clearSave = (data) => {
  return request({
    url: '/opermgt/problemInfo/clearAlert',
    method: 'POST',
    data: data
  })
}
